Skip to main content

Set Text

AutomatR.Web.SetText

The "Set Text" activity in AutomatR is designed for UI automation workflows, allowing you to write a string to the Text attribute of a specified UI element on a web page. This activity is useful for entering text into input fields or other elements that accept textual input.

Properties

NameDescription
Input
ElementSelect the web element using the provided selector window. This indicates the UI element on the web page. Use either the "Element" or "WebElement" property.
WebElementEnter the UI element variable identified by the "Find Element" or other activities. Use either the "Element" or "WebElement" property.
TextEnter the string text to be written to the specified UI element. This is the text that will be entered into the targeted element on the web page.
Optional
TimeoutEnter the time, in seconds (e.g., 5), for the activity to be executed before throwing an exception. This is the maximum time the activity will wait for the UI element to be ready for text input. If not provided, a default timeout will be used.
DelayEnter the wait time in seconds before starting the activity. This can be useful for handling synchronization issues or waiting for specific conditions before setting text.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Highlight TimeIf the workflow instance is set to highlight elements during execution, specify the time duration (in milliseconds) for which the element should be highlighted after setting the text.

How to use:

  1. Drag and drop the "Set Text" activity onto the workflow.
  2. Configure the properties by selecting the web element or providing the UI element variable and entering the text to be set.
  3. Optionally, configure the timeout, delay, and highlight time.
  4. Execute the workflow to write the specified text to the targeted UI element on the web page.

Example: Consider an example where the "Set Text" activity is used to enter a search query into a search input field on a web page:

Set Text:
Element: (Use the selector window to choose the search input field)
Text: "AutomatR Workflow"
Timeout: 5 (seconds)
Delay: 2 (seconds)
Highlight Time: 500 (milliseconds)

In this example, the activity sets the specified text "AutomatR Workflow" into the search input field. The timeout is set to 5 seconds, there's a delay of 2 seconds before starting the activity, and the element is highlighted for 500 milliseconds after setting the text.